Salesforce UX API icon

Salesforce UX API

(0 reviews)

TMF666 - getBillingAccountById-PR

This document contains three integrations

  1. Towards Aria ( SF --> ESB --> ARIA )
  2. Towards CSG ( SF --> ESB --> CSG)
  3. Retrieve customer information from CSG (SF --> ESB --> CSG)

==> 1. Towards Aria Integrations

Get the current balance due and total balance due for the Master Plan Instance on a given account along with the date through which the account has been billed.

Also provides dunning information if acount is in under dunning process.

URL
http://[localhost]:[port]/sfdc-ux/v1/{businessId}/billingAccount/{id}
url Param
nametypedescriptionrequired
businessIdstring2 letter ISO 3166 country code (TT, BB, JM, PA, PR etc.) identifying the business unit. Expected one is "PR"-Puerto RicoY
idstringIdentifier of an instance of the resource. In this case it will be account numberY
nametypedescriptionrequired
client_idstringThe client_id identifying the channel.Y
client_secretstringPassword associated with the client_id.Y
X-Correlation-IDstringAn identifier for the current call chain that can be used to tie together log entries on multiple layers (e.g. client, server, mainframe). This identifier must be designed to be unique across all applications.Y
targetSystemstringTo identify the target BSS. Example: csg, aria, matrixx etc We know this is Deprecated, but this was implemented long backY
Query Param
nametypedescriptionrequired
accountRelationship.account.idstringThe client-defined identifier of the Master Plan Instance.Y
cURL request
curl --location 'https://nonprod.esb.cloud.lla.com/dev/aria-account-management-sys/v1/PR/billingAccount/21517658-21518862?accountRelationship.account.id=21517658-21518862' \
--header 'X-Correlation-ID: 644e1dd7-2a7f-18fb-b8ed-ed78c3F92cDD' \
--header 'client_id: 784c9a6dd7ae49768816cab57fcf1fa1' \
--header 'client_secret: 187b259EB77441babbF611d2646C670d'\
--header 'targetSystem: Aria'
Possible response success

This section defines all the possible data structures received by the client and that must be considered satisfactory at the time of responding to the method.

[ 200 ]

OK - retrieve request processed successfully, response body contains an entity corresponding to the requested resource.

{
    "@type": "BillingAccount",
    "accountBalance": [
        {
            "balanceType": "TotalOutstandingBalance",
            "amount": {
                "unit": "usd",
                "value": "0"
            },
            "validFor": {
                "endDateTime": "2023-08-05T00:00:00:000Z"
            }
        },
        {
            "balanceType": "CurrentOutstandingBalance",
            "amount": {
                "unit": "usd",
                "value": "0"
            }
        },
        {
            "balanceType": "Credit",
            "amount": {
                "unit": "usd",
                "value": "-17"
            }
        }
    ],
    "characteristic": [
        {
            "value": "Medium_Risk_Customers",
            "name": "riskProfileId"
        },
        {
            "value": "1",
            "name": "dunning_step"
        },
        {
            "value": 0,
            "name": "dunningState"
        },
        {
            "value": "2024-04-30",
            "name": "dunning_degrade_date"
        },
        {
            "value": "Methods",         //payment_option
            "name": "paymentOption"
        },
        {
            "value": 13,                //pay_method_type
            "name": "PayMethodType"
        }
    ],
    "paymentPlan": [
        {
            "paymentMethod": {
                "id": "PM-a6Ido0000006npFEAQ",   //client_payment_method_id
                "name": "AutoPay_Due_15_PR",     //client_collections_group_bg_id
                "description": "Tokenised Credit Card"  //pay_method_description
            }
        }
    ],
    "taxExemption": [
        {
            "certificateNumber": "Cert456",
            "@type": "TaxExemptCertificate",
            "reason": "B"
        }
    ]
}
Definitions
NameTypeM/ODescription
accountBalanceArrayOThe balance on the Account. It’s a response object for GET/PATCH call in Liberate. Cerillion API does not provide the data.
accountBalance.balanceTypeStringOType of the balance : LastBillAmount, TotalOutstandingBalance, OverdueBalance, CurrentBalance, DepositHeld, etc.
accountBalance.amountObjectOBalance amount
accountBalance.amount.unitStringOCurrency (ISO4217 norm uses 3 letters to define the currency). Examples: USD, EUR, ANG, XCD, SRD
accountBalance.amount.valueStringOA positive floating point number
accountBalance.validForObjectOBalance validity period
accountBalance.validFor.endDateTimeDateTimeOEnd Date and Time
@typeStringOType of account.
characteristicArrayOAny additional characteristic(s) of this billing Account. please refer below characteristic table for more details
characteristics.namestringOAccount characteristic Name. Ex: 'dunningState'.
characteristics.valueAnyOAccount characteristic Value. Ex: '0'.
paymentPlanarrayOpayment methods Info
paymentPlan.paymentMethodobjectOA payment method reference
paymentPlan.paymentMethod.idstringOThe client-defined billing primary payment method ID
paymentPlan.paymentMethod.namestringOClient-defined collections account group ID to assign to this account
paymentPlan.paymentMethod.descriptionstringODescription for the primary payment method.
taxExemptionarrayOProof of freedom from taxes imposed by a taxing jurisdiction.
taxExemption.certificateNumberstringOIdentifier of a document that shows proof of exemption from taxes for the taxing jurisdiction.
taxExemption.reasonstringOReason of the tax exemption
taxExemption.@typestringOWhen sub-classing, this defines the sub-class entity name
characteristic values
nametypedescriptionrequired
paymentOptionstringThis allows you to select either payment methods (such as a credit card or other electronic form of payment) or payment terms (such as a physical check) when creating or modifying a billing group' 'Methods' means 'autoPay' 'Terms' means 'non-autoPay'N
PayMethodTypestringThis is the method_id corresponding to a payment method such as credit card, Electronic Check, Pre-Paid, Net Terms, etc.N
dunningStatestringDunning state assigned to the master plan instance. In Progress indicates the master plan is in dunning. None indicates the master plan is not in dunning. Note that dunning state is applicable only for master plans and is set to Complete by the system once the dunning process is completed.N
riskProfileIdstringClient-defined dunning process identifier.N
Possible response error

In this section all the possible data structures received by the client are defined and that must be considered as unsatisfactory when responding to the method.

[ 400 ]

Bad Request - the request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.

{
  "errors" : [{
      "code" : 400 ,
      "message" : "The request is invalid or not properly formed.",
      "description" : "The client sent too many requests and server is not able to serve them all at the moment"
    }
  ]
}
[ 401 ]

Unauthorized - The request has not been applied because it lacks valid authentication credentials for the target resource.

{
  "errors" : [{
      "code" : 401 ,
      "message" : "The user could not be authenticated for this request.",
      "description" : "The request has not been applied because it lacks valid authentication credentials for the target resource"
    }
  ]
}
[ 404 ]

Not Found - server has not found a resource with that URI. This may be temporary and permanent condition. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.

{
  "errors" : [{

      "code" : 404,
       "message" : "The request is invalid or not properly formed.",
      "description" : "The requested operation failed because a resource associated with the request could not be found."
    }
  ]
}
[ 405 ]

Method Not Allowed - HTTP method not allowed for this resource. The method specified in the Request-Line is not allowed for the resource identified by the Request-URI.

{
    "errors": [{
            "code": 405,
             "message": "APIKIT:METHOD_NOT_ALLOWED",
             "description": "HTTP Method post not allowed for : /{businessId}/billingAccount/{id}"
        }]
}
[ 429 ]

Too Many Requests - client has sent too many requests in a space of time (rate limiting). When a server is under attack or just receiving a very large number of requests from a single party, responding to each with a 429 status code will consume resources. Therefore, servers may drop connections or take other steps instead of responding with the 429 status code, when limiting resource usage.

{
  "errors" : [{

      "code" : 429,
       "message" : "The request is invalid or not properly formed.",
      "description" : "The requested operation failed because a resource associated with the request could not be found."
    }
  ]
}
[ 500 ]

Internal Server Error - server encountered an error processing request. This should not happen normally, but it is a generic error message, given when no more specific message is suitable.

{
  "errors" : [{
      "code" : 500,
      "message" : "The request failed due to an internal error.",
      "description": ""
    }
  ]
}
[ 501]
{
   "errors":[
      {
         "code":501,
         "message":"Not implemented",
         "description":"Operation GET /billingAccount/{id} for Business Id: XXXX not implemented"
      }
   ]
}
[ 503 ]

Service Unavailable - temporary maintenance of service, try again later. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the delay will be indicated in a Retry-After header. If no Retry-After is given, the client SHOULD handle the response as it would for a 500 response. Note: The existence of the 503 status code does not imply that a server will use it when becoming overloaded. Servers may simply refuse the connection.


==> 2. Towards CSG Integration

This operation will get the fixed line customer details by using MSISDN from CSG system

URL
http://[localhost]:[port]/sfdc-ux/v1/{businessId}/billingAccount
url Param
nametypedescriptionrequired
businessIdstring2 letter ISO 3166 country code (TT, BB, JM, PA, PR etc.) identifying the business unit. Expected one is "PR"-Puerto RicoY
namevaluedescriptionrequired
client_idstringThe client_id identifying the channel.Y
client_secretstringPassword associated with the client_id.Y
X-Correlation-IDstringAn identifier for the current call chain that can be used to tie together log entries on multiple layers (e.g. client, server, mainframe). This identifier must be designed to be unique across all applications.Y
Query Param
nametypedescriptionrequired
characteristic.namestringName of the characteristic, in this case the key name as MSISDNN
characteristic.valuestringValue of the characteristic, in this MSISDN valueY
cURL request
curl --location 'https://nonprod.esb.cloud.lla.com/dev/sfdc-ux/sfdc-ux/v1/PR/billingAccount?characteristic.value=7879257002&characteristic.name=MSISDN' \
--header 'X-Correlation-ID: 644e1dd7-2a7f-18fb-b8ed-ed78c3F92cDD' \
--header 'client_id: 784c9a6dd7ae49768816cab57fcf1fa1' \
--header 'client_secret: 187b259EB77441babbF611d2646C670d'
Possible response success

This section defines all the possible data structures received by the client and that must be considered satisfactory at the time of responding to the method.

[ 200 ]

OK - listBillingAccount request processed successfully, response body contains an entity corresponding to the requested resource.

[
    {
        "id": "8211990010038529",
        "href": "https://esb-test.lla.com/tmf-api/account-management-ux/v4/PR/billingAccount/individual/8211990010038529",
        "state": "InActive",
        "name": "FIBER HSD2 BILLING",
        "contact": [
            {
                "contactName": "FIBER HSD2 BILLING",
                "contactType": "Primary",
                "contactMedium": [
                    {
                        "mediumType": "BillingAddress",
                        "characteristic": {
                            "city": "SAN JUAN",
                            "postCode": "009231227",
                            "street1": "HILL TOWER 525 CALLE 1 APT 1018",
                            "stateOrProvince": "PR"
                        }
                    },
                    {
                        "mediumType": "Phone",
                        "characteristic": {
                            "phoneNumber": "7879257002"
                        }
                    }
                ]
            }
        ],
        "relatedParty": [
            {
                "id": "XXXX",
                "href": "https://esb-test.lla.com/tmf-api/account-management-ux/v4/PR/individual/XXXX",
                "name": "FIBER HSD2 BILLING",
                "role": "N/A",
                "@referredType": "Organization"
            },
            {
                "id": "1901501275141",
                "role": "Customer",
                "@referredType": "Customer"
            }
        ]
    }
]
Definitions

Each of the response parameters is detailed.

nametypedescriptionrequired
idstringBilling Account idN
hrefstringUnique reference of the accountN
statestringBilling account status from BSS Note: possible values are "NORMAL, InActive, VOLUNTARY DISC, NON-PAY DISC"N
namestringCustomer nameN
contactarrayList of Contact, used as a contact point for a given account and accessed via some contact medium.N
contact.contactNamestringCustomer nameN
contact.contactTypestringN
contact.contactMediumarrayA list of contact mediumsN
contact.contactMedium.mediumTypestringβ€œAddress” / ”Phone”N
contact.contactMedium.characteristicobjectA medium characteristicN
contact.contactMedium.characteristic.citystringCity nameN
contact.contactMedium.characteristic.postCodestringPost code valueN
contact.contactMedium.characteristic.street1stringAddress Line 1 NameN
contact.contactMedium.characteristic.stateOrProvincestringState name, mapped from StateN
contact.contactMedium.characteristic.phoneNumberstringPhone number of customerN
relatedPartyarrayThis will store the customer/party detailsN
relatedParty.idstringCustomer IdN
relatedParty.hrefstringReference of the related entity.N
relatedParty.namestringCustomer full nameN
relatedParty.rolestringCustomerN
relatedParty.@referredTypestringreferred type of relatedPartyN

3. Retrieve Customer Information from CSG

This operation is to retrieve Customer Information from CSG by account number.

URL
https://[localhost]:[port]/sfdc-ux/v1/{businessId}/billingAccount/{id}
url Param
nametypedescriptionrequired
businessIdstring2 letter ISO 3166 country code (TT, BB, JM, PA, etc.) identifying the business unit.Y
Query Param
nametypedescriptionrequired
accountRelationship.relationshipTypestringType of relationship. Ex : customerAccountY
nametypedescriptionrequired
client_idstringThe client_id identifying the channel.Y
client_secretstringPassword associated with the client_id.Y
X-Correlation-IDstringIdentifier that correlates HTTP request between a client and server. Any identification model (UUDI, checksum, etc.) can be used, as long as it is a unique value to differentiate a transaction. Note - Mule default behavior creates a sample x-correlation-id field if value is not passed from client, API will use this value in case value is not passed in API requestY
cURL request
curl --location 'https://nonprod.esb.cloud.lla.com/dev/sfdc-ux/sfdc-ux/v1/PR/billingAccount/80112233456?accountRelationship.relationshipType=customerAccount' \
--header 'X-Correlation-ID: 644e1dd7-2a7f-18fb-b8ed-ed78c3F92cDD' \
--header 'client_id: 12345' \
--header 'client_secret: abcde'
Response
{
    "id": "80112233456",
    "name": "Carlos Rivera",
    "relatedParty": [
        {
            "id": "123-45-6789",
            "name": "Carlos Rivera",
            "@referredType": "Individual"
        }
    ],
    "contact": [
        {
            "contactType": "primary",
            "contactMedium": [
                {
                    "mediumType": "GeographicAddress",
                    "characteristic": {
                        "contactType": "PhysicalAddress",
                        "street1": "123 Calle San SebastiΓ‘n",
                        "street2": "Apt 4B",
                        "postCode": "00901",
                        "city": "San Juan",
                        "stateOrProvince": "PR"
                    }
                },
                {
                    "mediumType": "PhoneNumber",
                    "characteristic": {
                        "contactType": "Phone1",
                        "phoneNumber": "7879257002"
                    }
                },
                {
                    "mediumType": "PhoneNumber",
                    "characteristic": {
                        "contactType": "Phone2",
                        "phoneNumber": "7879257003"
                    }
                }
            ]
        },
        {
            "contactType": "secondary",
            "contactMedium": [
                {
                    "mediumType": "GeographicAddress",
                    "characteristic": {
                        "contactType": "BillingAddress",
                        "street1": "456 Avenida Ponce de LeΓ³n",
                        "street2": "Suite 210",
                        "postCode": "00909",
                        "city": "San Juan",
                        "stateOrProvince": "PR"
                    }
                }
            ]
        }
    ],
    "characteristic": [
        {
            "value": "1985-07-15",
            "valueType": "date",
            "name": "date_of_birth"
        }
    ]
}
Definitions

Each of the response parameters is detailed.

nametypedescriptionrequired
idstringCustomer account numberY
namestringCustomer nameY
relatedPartyarrayRelated Entity referenceY
relatedParty[].idstringEncrypted SSNY
relatedParty[].namestringCustomer nameY
relatedParty[].@referredTypestringThe actual type of the target instance when needed for disambiguationY
contactarrayAn individual or an organization used as a contact point for a given accountY
contact[].contactTypestringType of contact (primary, secondary...)N
contact[].contactMedium[].mediumTypestringType of the contact mediumN
contact[].contactMedium[].characteristicobjectIndicates the contact medium that could be used to contact the party.N
contact[].contactMedium[].characteristic.contactTypestringDescribes the contact medium typeN
contact[].contactMedium[].characteristic.street1stringDescribes the streetN
contact[].contactMedium[].characteristic.street2stringComplementary street descriptionN
contact[].contactMedium[].characteristic.postCodestringPost CodeN
contact[].contactMedium[].characteristic.citystringThe cityN
contact[].contactMedium[].characteristic.stateOrProvincestringState or provinceN
contact[].contactMedium[].characteristic.phoneNumberstringCustomer Phone NumberN
characteristicarrayExtended characteristicN

charactereristics:

characteristic nametypedescription
date_of_birthdate(yyyy-mm-dd)Date of birth of the customer
Possible response error

In this section all the possible data structures received by the client are defined and that must be considered as unsatisfactory when responding to the method.

[ 400 ]

Bad Request - the request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.

{
  "errors" : [{
      "code" : 400,
      "message" : "The request is invalid or not properly formed.",
      "description" : "Malformed request syntax, invalid request message framing, or deceptive request routing."
    }]
}
[ 401 ]

Unauthorized - The request has not been applied because it lacks valid authentication credentials for the target resource.

{
  "errors" : [{
      "code" : 401,
      "message" : "The user could not be authenticated for this request.",
      "description" : "The request has not been applied because it lacks valid authentication credentials for the target resource"
    }]
}
[ 404 ]

Not Found - server has not found a resource with that URI. This may be temporary and permanent condition. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.

{
  "errors" : [{
      "code" : 404,
      "message" : "The server could not find the requested resource.",
      "description" : "The requested operation failed because a resource associated with the request could not be found."
    }]
}
[ 405 ]

Method Not Allowed - HTTP method not allowed for this resource. The method specified in the Request-Line is not allowed for the resource identified by the Request-URI.

{
    "errors": [{
            "code": 405,
             "message": "APIKIT:METHOD_NOT_ALLOWED",
             "description": "HTTP Method POST not allowed for : /{businessId}/billingAccount/{id}"
        }]
}
[ 500 ]

Internal Server Error - server encountered an error processing request. This should not happen normally, but it is a generic error message, given when no more specific message is suitable.

{
  "errors" : [{
      "code" : 500,
      "message" : "Internal Server Error",
      "description": "The request failed due to an internal error"
    }]
}
[ 501 ]

Not implemented - indicates that the server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource.

{
  "errors" : [{
      "code" : 501,
      "message" : "Not implemented",
      "description" : "Operation GET /billingAccount/{id} for Business Id: xxxx not implemented"
    }]
  }

Reviews